package com.xxl.job.admin.server.custom;

import com.xxl.job.admin.server.controller.annotation.PermissionLimit;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/xxl-job/job-info")
@Slf4j
public class JobInfoOpenApiController {

    @PostMapping(value = "/saveJobInfo")
    @PermissionLimit(limit = false)
    public Integer saveJobInfo(@RequestBody XxlJobInfoDto xxlJobInfoDto) {
        log.info(xxlJobInfoDto.getJobDesc());
        return 19;
    }
}
